package com.chexiehui.jc.mvp.forum;

import com.chexiehui.jc.Constants;
import com.chexiehui.jc.base.BaseModel;
import com.chexiehui.jc.base.BaseView;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * @Description 编辑论坛
 * @Auth SongJun
 * @Date 2020/05/21 00:18
 **/
public interface ForumEditCovenant {

    interface View extends BaseView {
        void onUploadImageSuccess(BaseModel<String> successResult);
        void onUploadImageFailure(BaseModel<Object> failureResult);
        void onSubmitSuccess(BaseModel<Object> successResult);
        void onSubmitFailure(BaseModel<Object> failureResult);
        String getForumId();
        String getForumType();
        String getForumSeries();
        String getForumName();
        String getForumHead();
        String getForumIntroduce();
    }

    interface Stores {
        @FormUrlEncoded
        @POST(Constants.URL_UPDATE_FORUMS)
        Observable<BaseModel<Object>> submit(
                @Field("id") String id,
                @Field("name") String name,
                @Field("type_Sel") String type_Sel,
                @Field("path_Upload") String path_Upload,
                @Field("introduction") String introduction,
                @Field("carseriesSel_Source") String carseriesSel_Source
        );
    }

    interface Presenter {
        void uploadImage(String filePath);
        void submit();
    }

}